import java.util.ArrayList;

public class Warrior extends Piece {
	/*
	 * 8	- - - - - - - - - - - -
	 * 7	- - - - - - - - - - - -
	 * 6	- - - - - - - - - - - -
	 * 5	- - - - - c m c - - - -
	 * 4	- - - - - - W - - - - -		EARTH (2)
	 * 3	- - - - - - - - - - - -
	 * 2	- - - - - - - - - - - -
	 * 1	- - - - - - - - - - - -
	 * 		a b c d e f g h i j k l
	 * 
	 * Warrior stays on the EarthBoard. It can move forward and can capture diagonally one space.
	 */
	
	public Warrior(int s) {
		super(s);
	}

	protected ArrayList<Square> getAvailableMoves() {
		moves.clear();
		moves.add(getSquare().getFarSquare((getSide() - 1) * 180, 1));
		if(!hasMoved) {
			moves.add(getSquare().getFarSquare((getSide() - 1) * 180, 2));
		}
		System.out.println(moves);
		return moves;
	}
	
	protected ArrayList<Square> getAvailableCapts() {
		capts.clear();
		capts.add(getSquare().getFarSquare(((getSide() - 1) * 180 + 45) % 360, 1));
		capts.add(getSquare().getFarSquare(((getSide() - 1) * 180 + 225) % 360, 1));
		return capts;
	}
	
	public String toString() {
		if(side == 1) {
			return "W";
		} else if(side == 2) {
			return "w";
		} else {
			return "no side";
		}
	}
}
